Methods and systems for controlling a state of a neurostimulator

ABSTRACT

A method and system is described for ensuring a state of an active implantable medical device based on the presence and persistence of a magnetic field. The output of a magnetic field sensor is monitored. The active implantable medical device is maintained in a first state, for so long as the presence of a magnetic field is detected by the magnetic field sensor, until a first interval is surpassed. If the first interval is surpassed, then a determination is made as to whether a second interval has been surpassed. If it is determined that the second interval has not been surpassed, then the active implantable medical device is transitioned into a second state. If it is determined that the second interval has been surpassed, then it is ensured that the active implantable medical device is in a predetermined one of the first and second states.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is a continuation of U.S. application Ser. No.15/135,247, entitled “Methods and Systems for Controlling a State of aNeurostimulator” and filed on Apr. 21, 2016, now U.S. Pat. No.9,463,322, which is a divisional of U.S. application Ser. No.13/631,820, entitled “Methods and Systems for Controlling a State of aNeurostimulator” and filed on Sep. 28, 2012, now U.S. Pat. No.9,345,884, each of which is expressly incorporated by reference hereinin its entirety.

FIELD

The field relates generally to active implantable medical devices, andmore particularly to selecting a state of an active implantable medicaldevice using an external component such as a magnet.

BACKGROUND

Active implantable medical devices, for example, implantable medicaldevices that are configured to deliver energy or another form oftreatment to the body such as for patients with epilepsy or a movementdisorder, often are configurable to communicate with an externalcomponent that includes a magnet. The magnet may be used by the patientand/or a patient's caregiver (including a physician) for some level ofcontrol of the active implantable medical devices.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating an active implantable medicaldevice in its use environment, implanted in a patient

FIG. 2 is a schematic illustration of a patient manipulating an externalmagnet relative to the site at which an active implantable medicaldevice has been implanted, in accordance with an embodiment.

FIG. 3 is a schematic illustration of the position of an external magnetafter the manipulation indicated in FIG. 2 has occurred.

FIG. 4 is a block diagram of an implantable responsive neurostimulationsystem which may be used with embodiments.

FIG. 5 is a timing diagram illustrating a sequence of events in a methodfor selecting a state of an active implantable medical device that isconfigured to be in at least two states, in accordance with embodiments.

FIG. 6 is a timing diagram illustrating a feature of generating auditoryfeedback in a method for selecting a state of an active implantablemedical device that is configured to be in at least two states, inaccordance with other embodiments.

FIG. 7 is a flow chart of a method for selecting either a “therapydisabled” state or a “therapy enabled” state of an active implantablemedical device, according to embodiments.

The drawings referred to in this description should not be understood asbeing drawn to scale unless specifically.

DESCRIPTION OF EMBODIMENTS

Various embodiments are described below, with reference to detailedillustrative embodiments, in the context of active implantable medicaldevices and, in particular, an implantable neurostimulator. It will beapparent that the methods and systems described herein can be embodiedin a wide variety of forms. Consequently, the specific structural andfunctional details disclosed herein are representative and do not limitthe scope of embodiments.

Examples of methods and systems for selecting a state of an implantableneurostimulator that is configured to be in at least two states (e.g.,“therapy disabled” and “therapy enabled”) are described herein.Embodiments describe a method for unequivocally disabling or enablingthe therapy a neurostimulator is programmed to deliver that isuncomplicated and requires only a simple magnet to accomplish. Someembodiments also provide a patient with auditory feedback (e.g., one ormore different tones) when the neurostimulator is in one or the other ofits possible states, or when the neurostimulator is susceptible oftoggling between states, to facilitate a patient's (or caregiver's)ability to use a magnet to control the state of the neurostimulator.

Active implantable medical devices (i.e., devices that deliver energy orother treatment to the body) are typically provided with means forcommunicating with components external of the patient, such as inductivetelemetry, that allows an external host to change modes or settingsusing various communication protocols. While inductive telemetry is mostcommonly used for bidirectional communication with the implant (e.g., toprogram a neurostimulator or to interrogate a neurostimulator toretrieve data from the implant), an active implantable medical devicealso often is provided with a simpler unidirectional communicationprotocol that involves an external magnet (manipulable by the patient orthe patient's caregiver) and a sensor in the implant configured todetect the presence (or absence) of the magnet.

Implantable neurostimulators are known that are provided with a magnetsensor such as a reed switch or a giant magneto-resistive effect sensor(GMR sensor). The magnet sensor is configured so that when an externalmagnetic field (e.g., from an external hand-held magnet) is brought nearenough to the magnet sensor, the neurostimulator will react to thepresence of the magnet by disabling a therapy the neurostimulator isconfigured to deliver.

For example, if a patient has a movement disorder and has been implantedwith a neurostimulator that is configured to deliver electricalstimulation to the patient's brain as a therapy to reduce tremors (asymptom of the patient's movement disorder), there may be times when thepatient wants to disable the therapy (for example, because the patientexperiences some unpleasant sensation when the stimulation is delivered[the stimulation may be at too high of an amplitude or frequency] orbecause the patient is going to sleep, and the patient does not noticetremors while sleeping and therefore has no desire to receive thetherapy during that time).

A neurostimulator that can be disabled by a magnetic field is alsodesirable in certain medical situations in which it is impractical orinefficient to communicate with the implanted device using telemetrywith a programmer. For instance, in an emergent situation (e.g., apatient comes into the emergency room and a caregiver tells emergencyroom personnel that he has an active implanted medical device, and theER wants to subject the patient to, for example, an imaging procedure,like an MRI), being able to disable a function of the implant using amagnetic field from a readily-available magnet may be a practicalalternative to using a programmer to accomplish the same thing Thus, amagnetic field may be used for some limited control over the activeimplant's behavior whenever it is not practical or desirable to resortto other ways of communicating between the implant and the outside worldthat otherwise might be available (e.g., near field or long rangetelemetry).

It will be appreciated that a patient may simply wish to suspend aparticular therapy being delivered by an active implant for any of avariety of reasons, until the patient can get some feedback from aphysician. For example, a patient with an implanted neurostimulator maythink he or she is experiencing some side effect associated with thetherapy, and therefore may want to stop delivery of the therapy untilthe patient can consult with a physician in a clinic visit (or over thetelephone).

Active implantable medical devices that are configured to adjust theirbehavior based on the presence or absence of a magnet are known where:(1) the implant is turned off when a magnet is present and only for solong as the magnet is present (i.e., the implant's function is restoredas soon as the implant no longer detects the magnet); and (2) theimplant is turned off when a magnet is present for a minimum period oftime and then remains off until such time as a physician can turn itback on (e.g., in an office visit).

In the first case, the patient (or the patient's caregiver) is somewhatinconvenienced insofar as the external magnet has to be held next to theimplant site unless and until the patient is amenable to having thedevice function restored: if the patient (or caregiver) takes the magnetaway, the device will come back “on.” If the patient is not in aposition to establish a telemetry link between the implant and theoutside world (e.g., with a physician's programmer) right away, then thepatient will have to be vigilant about keeping the magnet next to theimplant site until some other intervention can take place.

In the second case, the patient (or patient's caregiver) may be able tosatisfactorily address the issue of turning the implant off (e.g.,disabling electrical stimulation therapy because of unpleasant sideeffects) right away by using the magnet, but if the patient wants toturn the implant back on, he or she will have to wait until a doctor'svisit (or until the implant otherwise can be connected to a programmeror other external component other than the magnet) to do so.

It can also be appreciated that an active implantable medical deviceconfigured to turn off when the presence of a magnet is detected for atleast a certain period of time (i.e., the second case mentioned above),in fact may turn off accidentally when the patient is in the presence ofa strong enough magnetic field, even if the patient does not intend toturn the implant off. Environmental magnetic fields that might be strongenough to affect a magnet sensor in an active implantable medical devicemight occur in an airport (by proximity to airport security screeningapparatuses) or in a hospital (by proximity to strong magnetic fieldsused in imaging or forms of treatment). If the particular active implantis not delivering a type of therapy that the patient typically can feel(for example, a patient may not normally feel electrical stimulationdelivered to neural tissue), then the patient may have no practical wayof knowing for sure whether a recent trip through airport securityturned off the therapy or not.

Still other active implantable medical devices are known in which astimulation therapy can be toggled between “on” and “off” if the implantdetects a magnet. For example, if the stimulation is “on”, it will betoggled “off” when a magnet is detected and vice versa (i.e., if thestimulation is “off,” it will be turned “on” when a magnet is detected).This toggling behavior allows stimulation to be disabled without thepatient or caregiver having to hold the magnet in place near the implantthe whole time. However, if the patient or caregiver is not sure whatstate the implant is in just before the magnet is used to toggle thestate, then it follows that the patient will not be sure what state theimplant is in after the toggle. Again, in many applications of activeimplantable medical devices, the patient normally does not feel thetherapy he or she is receiving, so the patient will not necessarily beable to tell whether the implant is delivering therapy or not.

For example, if the application is a neurostimulator configured todeliver continuous electrical stimulation therapy to treat symptoms of amovement disorder such as tremor, the patient may not be able to tellwhether stimulation is on or off if the patient doesn't happen to beexperiencing any symptoms directly after using the magnet. When thepatient later experiences symptoms, the patient may not be whether hissymptoms are getting worse despite the therapy delivered by the implantor whether his symptoms are recurring because the implant is notdelivering stimulation at all. If the patient cannot tell which statethe implant is in, the patient may need to visit a doctor to sort it allout (e.g., so that the physician can use a programmer to establish aninductive telemetry link to the implant and thereby turn it back on orre-enable stimulation therapy as the case may be). Thus, implantsconfigured in this toggling second mode may also be inconvenient,especially if a particular patient is prone to over use of the magnet.

Thus it would be beneficial if the patient could be sure of what statean active implantable medical device is in (e.g., “on” or “off”,“stimulation enabled” or “stimulation disabled”, “stimulation at fullprogrammed strength” or “reduced stimulation”, etc.) when the patientuses the magnet in an effort to manipulate the implant. It further wouldbe beneficial if the patient did not have to keep a magnet up againstthe implant site in order to be confident that the active implantablemedical device was either in one state or the other.

Associating the effect a magnet has on an implant with some sort ofauditory or other somatosensory feedback may be helpful, and in fact isa feature included in some of the embodiments described herein. However,incorporating this type of functionality into a system that includes anactive implantable device may be associated with costs or designtrade-offs that it otherwise might be desirable to avoid. Therefore,embodiments described here include magnet behavior that allows thepatient or a caregiver to unequivocally establish in which state anactive implant is in with a simple procedure that can be set out in apatient user manual and/or easily communicated to a patient from a “helpdesk” via telephone, email or a website, for example, a website using aninstant messaging utility.

Overview of Discussion

The discussion begins with a description of an active implantablemedical device, the behavior of which may be controlled to some degreebased on a signal generated by a magnet sensor provided in the implant.More particularly, the description is directed to a specific example ofan implantable responsive neurostimulator configured with a magnetsensor and magnet tracking system that controls certain behavior of theneurostimulator in the presence of a magnetic field (e.g., from anexternal magnet with which the patient is provided).

Active Implantable Medical Device with Tracking System for a MagneticField

FIG. 1 illustrates an active implantable medical device. The device is aneurostimulator 106 configured with a magnet sensor 130 such that thebehavior of the neurostimulator 106 may be affected by the presence of amagnetic field applied from an external source, such as a magnet that issupplied to the patient as part of the neurostimulation system.

The neurostimulator 106 is shown implanted in a patient 124 (e g,implanted in a ferrule which is situated during a craniotomy). Theneurostimulator 106 is configured to deliver a form of therapy to thepatient that is intended to modulate the activity of the neural cells ofthe patient, such as current-controlled or voltage-controlled electricalstimulation therapy. For example, the neurostimulator 106 can be placedin operable communication with one or more electrodes (an oval-shapedsingle electrode 118 is shown in FIG. 1). Electrodes can be configuredwith the neurostimulator 106 in various stimulation pathways to deliverstimulation to the patient's tissue.

The neurostimulator 106 may be programmed to deliver stimulation to thepatient continuously or on a periodic or scheduled basis. In some cases,the neurostimulator 106 may only have the capability to deliverstimulation. In other cases, the neurostimulator 106 may have morecomplex capabilities. For example, a neurostimulator configured as aresponsive neurostimulator may have the capacity to deliver a form oftherapy when it detects a pattern of activity or other “event” in one ormore channels of electrographic signals continuously monitored from thepatient (e.g., using leads bearing electrodes that are implanted in oron the brain). In a responsive neurostimulator, the same leads andelectrodes that are used for delivering the therapy to the patient mayalso be used for monitoring electrographic signals from the patient.

Generally, a responsive neurostimulator is configurable to sense signalsfrom the patient corresponding to electrical activity of the brain, tocontinuously monitor and process the sensed signal to identify patternsor other features of the signal or patterns and/or features associatedwith the signal (such as, but not limited to, the date or time thesignal is sensed and/or the condition of the implantable medical deviceat the time a pattern or other feature is detected [e.g., whether asignal amplifier is saturated and, if so, for how long]), and toidentify one or more “events” in the monitored signal when certain“detection” criteria are met (e.g., meeting or exceeding fixed ordynamic thresholds [trends)]). A responsive neurostimulation system isunder investigation by NeuroPace, Inc. under the tradename “RNS SYSTEM”.U.S. Pat. No. 6,016,449 to Fischell et al. for “System for Treatment ofNeurological Disorders” issued Jan. 18, 2000 and U.S. Pat. No. 6,810,285to Pless et al. for “Seizure Sensing and Detection Using an ImplantableMedical Device,” issued Oct. 26, 2004, also describing neurostimulationsystems with responsive capabilities. U.S. Pat. Nos. 6,016,449 and6,810,285 are incorporated by reference herein in the entirety.

The signals sensed from the patient may be monitored by a physician orother caregiver in real time, by connecting the implanted device to anexternal component such as a physician's programmer that is capable ofcommunicating with the implant wirelessly, such as via telemetry.Alternatively or additionally, the neurostimulator 106 may be configuredto store selected signals of the sensed signals according to certainprogrammed instructions. Such storage may occur periodically, wheneveran event is detected, or upon command from an external component, suchas a patient remote monitor 126, a physician's programmer 120A, 120B,120C, or 120D (each of which may wirelessly communicate with theimplant), or a magnet (see the magnet 220 in FIGS. 2 and 3) (thepresence of which may be detected by a magnet sensor in the implant). Inan application of the responsive neurostimulator 106 to diagnose and/ortreat epilepsy, for example, the responsive neurostimulator 106 may beconfigured to detect seizures and/or seizure onsets or precursors.

The neurostimulator 106 records neurological signals, such aselectrographic signals in the form of electroencephalographic (EEG) andelectrocorticographic (ECoG) waveforms, detects and analyzeselectrographic signals, and/or creates a log of such an analysis. Ingeneral, EEG signals represent aggregate electrical potentials relatedto neuronal activity within the brain detectable via sensors applied toa patient's scalp. ECoG signals, which are intracranial counterparts tothe EEG signals, are detectable via sensors implanted over, on, or underthe dura mater, and often within the patient's brain. Unless otherwisenoted herein, the term “EEG” shall be used generically herein to referto both EEG and ECoG signals.

The neurostimulator 106 typically has a relatively large number andvariety of parameters that can be set and subsequently be modified in aprogramming session after the neurostimulator 106 is implanted in apatient. Thus, for example, the neurostimulator 106 may be programmed tobegin recording detected EEG signals satisfying certain detectionparameters or criteria (e.g., based on a combination of parametervalues) from the patient 124 at the onset of ictal (seizure) activity oras a result of a prediction of ictal activity. The neurostimulator 106may be configured to record signals or values corresponding or relatedto signals at times before, during and after the detection criteria havebeen met. The neurostimulator 106 may continue recording until the ictalactivity stops. Optionally, the neurostimulator 106 saves the recording,or a sampling of it, to a memory device to preserve it for lateruploading to the external device.

The neurostimulator 106 may also create a log of the ictal activity. Inone example, the neurostimulator 106 records and/or logs the date andtime when an event begins and ends, the duration of the event,indications of the intensity of the event, etc. The neurostimulator 106,optionally, uploads such a log to an external device, such as, but notlimited to, a programmer 120A, 120B, 120C, or 120D (described in greaterdetail below). The neurostimulator 106 may also be configured to recordand/or preserve data corresponding to EEG signals upon the initiation ofsome action (e.g., swiping an external magnet near the site at which theneurostimulator 106 is implanted) by the patient, a caregiver or aphysician.

In some embodiments, the neurostimulator 106 detects and/or predicts anykind of neurological event that has a representative electrographicsignature. While an embodiment is described herein as responsive toepileptic seizures, it should be recognized that the neurostimulator 106can respond to other types of neurological disorders, such as movementdisorders (e.g., Parkinson's disease), migraine headaches, chronic painand neuropsychiatric disorders (e.g., depression). In variousembodiments, the neurostimulator 106 detects neurological eventsrepresenting any or all of these afflictions when they are actuallyoccurring, in an onset stage, and/or as a predictive precursor beforeclinical symptoms begin.

Referring still to FIG. 1, the neurostimulator 106 is shown as implantedin a space or volume formed in the patient's cranium by craniotomy orother neurosurgical techniques well-known in the art (the ferrule inwhich the neurostimulator 106 is positioned is not shown). However, itshould be appreciated that the placement described and illustratedherein is merely an example. Other locations and configurations are alsopossible, depending on the size and shape of the device and thepatient's needs, among other factors.

Generally, the neurostimulator 106 is positioned to follow the contoursof a patient's cranium 102. However, other locations within thepatient's body are also possible. For example, the neurostimulator 106may be implanted pectorally (not shown) with leads extending through thepatient's neck and between the patient's cranium 102 and scalp.

With continued reference to FIG. 1, the neurostimulator 106 includes ahousing 104 that encapsulates electronics that allow the desiredneurological signals to be detected and/or recorded and stored and thetherapy (e.g., electrical stimulation therapy) to be delivered. Otherimplantable components of a neurostimulation system including theneurostimulator 106 include electrode(s) 118 for monitoring or measuringelectrographic signals and/or for delivering electrical stimulation tothe patient's neural tissue. An electrode 118 may be formed from aplatinum member. It will be appreciated that a neurostimulation systemmay include configuring a neurostimulator 106 to be in operablecommunication with sensing or stimulation elements other thanelectrode(s) 118.

For example, if the application of the responsive neurostimulationsystem is to treat epilepsy, and a seizure focus previously has beenlocalized for the patient, the electrodes can be implanted at locationsintended to capture signals generated at or near the seizure focus.Commonly, a lead bearing electrodes (e.g., lead 114) at a distal endthereof is implanted through a hole 132 drilled in the patient's skull(usually referred to as a “burr hole” because of the cranial drill usedto form it). The proximal end of the lead is then connected to theneurostimulator to put the electrodes in electrical communication withthe neurostimulator. It will be appreciated that elements other thanelectrodes may be configured and used to sense physiological data fromthe patient other than electrographic signals, such as optical sensors,voltammetry sensors, oximetry probes, temperature probes, and the like.

The housing 104 may be fabricated from a biocompatible material, suchas, but not limited to, titanium. Titanium is light, extremely strongand biocompatible. Other biocompatible materials may additionally oralternatively be utilized in the fabrication of the housing 104.

The housing 104 may also enclose a battery 110 or other source of powerfor the neurostimulator, as well as a physical component or componentsthat allow the neurostimulator to perform the functions represented bythe blocks in the block diagram of FIG. 4. Most of the time theneurostimulator 106 will function autonomously (particularly whenperforming its usual sensing, detection, and recording capabilities),but the neurostimulator 106 may selectively be put in communication witha programmer or a patient remote monitor to wirelessly transmit datafrom the neurostimulator (i.e., to interrogate the neurostimulatorand/or monitor electrographic signals from the patient in real time withan external component) or to transmit information to the neurostimulator(e.g., programming instructions, updates to code the neurostimulatoruses to carry out its functions, etc.).

To enable wireless interrogation and delivery of new programminginstructions to the neurostimulator, a telemetry antenna (not shown) maybe provided inside or outside of the housing 104. The external devicesmay include devices commonly referred to as “programmers” 120A, 120B,120C, and 120D which may be laptops or tablets or other computers withwhich a physician can interrogate the implant and change the programmingof the implant, and a patient remote monitor 126 with which the patientcan interact in some limited fashion with the implant, such as tointerrogate the implant (so that data stored by the implant can beretrieved by the patient remote monitor and subsequently uploadedelsewhere, for example, over a network 122 to a central database)elsewhere.

In some embodiments, the inductive telemetry link between the implantedneurostimulator and the programmer or patient remote monitor may beestablished using a wand (not shown) by bringing the wand into thetransmitting and receiving range of the neurostimulator 106.

Several specific capabilities and operations performed by a programmer120A, 120B, 120C, or 120D in conjunction with the neurostimulator 106may include, but are not limited to, the following: specifying andsetting the values for parameters in the neurostimulator to adapt thefunction of the neurostimulator to meet the patient's needs; uploadingand/or receiving data (including but not limited to EEG waveforms, logsof events detected, or data items corresponding to a condition of thedevice [e.g., remaining useful life of battery], that are stored on theneurostimulator); downloading and/or transmitting program code and otherinformation; and commanding the neurostimulator 106 to perform specificactions and/or change modes, as instructed by a physician operating aprogrammer 120A, 120B, 120C, or 120D (hereinafter, “120”, unlessotherwise specifically noted). To facilitate these functions, aprogrammer 120 is adapted to receive physician input and providephysician output, for example, via a keypad or touch screen. Data istransmitted between a programmer 120 and the neurostimulator 106 usingthe wireless telemetry link.

More specifically, a programmer 120 may be selectively connected withthe network 122, such as the internet, via a telemetry communicationlink. This allows information that is uploaded from the neurostimulator106, as well as program code (or other information) intended fordownload to the neurostimulator 106, to be stored in a database 128 atone or more data repository locations (which may include various serversand network-connected programmers). This allows the patient's physicianto have access to important data, including past treatment informationand software updates, essentially anywhere in the world that there is aprogrammer (e.g., programmer 120A) or web browser (not shown) and anetwork connection.

A neurostimulator 106 according to embodiments has a magnet sensor 130configured to detect a magnetic field. For example, such a magnet sensor130 can be configured to detect the presence of a magnetic field when anexternal magnet is moved into the vicinity of the neurostimulator 106 bythe patient 124 or a caregiver. The neurostimulator 106 may beconfigured to modify its behavior when the presence of the magnet isdetected by the magnet sensor 130 as is described in more detail below.

FIGS. 2 and 3 illustrate a patient's use of an external magnet to modifythe behavior of an implanted neurostimulator 106 according toembodiments. The patient brings a donut-shaped magnet 220 next to a site222 at which the neurostimulator 106 (including the magnet sensor 130)has been implanted and then holds it there. The magnet sensor 130 may beincorporated inside the neurostimulator housing 104 or securedexternally of the housing 104 but in selectable operation with theneurostimulator, for example in an enclosure separate from theneurostimulator housing that is impermeable to body fluids. The magnetsensor 130 is configured to produce a signal that corresponds to whethera magnet 220 is either present or not present.

In some embodiments, the magnet sensor 130 may be configured with acircuit (e.g., in the active implantable medical device) that providesfeedback to indicate whether an external magnet is in a positionrelative to the implant so that the magnet will have the desired effecton the implant. The circuit may cause a tone to be generated or a visualcue to be displayed to the patient (or caregiver), such as on anexternal device, that allows the patient to position the magnetproximate to the implant for the best interaction between the magnet andimplant.

When the implanted magnetic sensor associated with the activeimplantable medical device senses the presence of a magnetic field, theactive implantable medical device may be configured to undertakedifferent behaviors based on the period of time for which the implantcontinuously senses the magnet. For example, if the patient merelyswipes the magnet over the implant, the period of time the implantsenses the magnet will be very short, and this short presence of themagnet may cause the implant to undertake one of several possibleactions. Which actions the implant takes may be programmable by thephysician or otherwise predetermined by a manufacturer's setting in thedevice. In a responsive neurostimulator that is configured to recordelectrographic signals from a patient, a magnet swipe may cause theneurostimulator to store a record corresponding to the electrographicsignals being sensed by the device at the time of the magnet swipe (orto place a marker in a record that the device is already storing at thetime of the magnet swipe). When the active implantable medical devicedetects the presence of a magnetic field for longer periods of time,then these longer periods of time may cause the implant to undertakedifferent behaviors as are discussed in more detail below, such asforcing the implant into one state or toggling the medical device from astate it was in just before the presence of the magnet was detected intoa different state when the magnetic field is no longer detected (e.g.,when the magnet 220 is taken away).

FIG. 4 is a block diagram of a responsive neurostimulator 106 of FIG. 1as may be used for monitoring a signal generated by the magnet sensor130. The magnet sensor 130 is configured so that its output correspondsto whether a magnetic field is or is not present relative to theneurostimulator 106. The magnet sensor output may be binary, i.e., asignal that is either at one level or another or a bit that is either a“1” or a “0”. The neurostimulator 106 may be configured so that a “high”magnet sensor output corresponds to the neurostimulator 106 detectingthe presence of the magnetic field and a “low” magnet sensor outputcorresponds to the neurostimulator 106 not detecting the magnetic field.The neurostimulator 106 may include algorithms and/or physicalcomponents or circuits for conditioning the output of the magnet sensor130 to improve it before it is used to affect the behavior of theneurostimulator 106. For example, the neurostimulator 106 may debouncethe output of the magnet sensor 130 before allowing a state change ofthe neurostimulator 106 based on the magnet sensor 130 output to occur.

The various functions of the neurostimulator 106 can be described withreference to a control module 108 that allows the implant to interfacewith elements for delivering a therapy to the patient and with theoutside world. In the responsive neurostimulator 106, the control module108 may also be configured to interface with elements for sensingphysiological data (such as electrographic signals) from the patient. Insome responsive neurostimulators, the same elements can be used forsensing physiological data and delivering therapy. For example, in theresponsive neurostimulation system under investigation by NeuroPace,Inc. under the trade name “RNS SYSTEM”, the control module of theneurostimulator interfaces with electrodes that are also implanted inthe patient and which the neurostimulator can configure either assensing elements or as stimulation elements.

In FIG. 4, an electrode interface 200 of the control module 108functions to select which electrodes (of the electrodes 118A, 118B,118C, and 118D [hereinafter, “electrode 118”, unless otherwise noted])are used by the neurostimulator 106 in which configurations and forwhich purposes (e.g., sensing data from the patient or deliveringtherapy to the patient).

The control module 108 is provided with a self-contained power supply206 (which may be a primary cell or rechargeable battery) that suppliesthe voltages and currents necessary for each of the other subsystems ofthe neurostimulator 106 to carry out its intended function(s), and aclock supply 212 which supplies needed clock and timing signals.

The control module 108 is provided with a memory subsystem 204 and acentral processing unit (CPU) 210, which can take the form of amicrocontroller.

The central processing unit 210 controls a therapy subsystem 214 whichis configured to output a form of therapy (e.g., electrical stimulationtherapy) to the patient, for example, via the electrode interface 200and then one or more of the electrodes 118. (The electrode interface 200may also encompass charge-balancing and other functions required for aproper interface with neurological tissue.) The communication subsystem208 allows the implanted neurostimulator 106 to communicate with theoutside world. For example, the communication subsystem 208 is providedwith a magnet sensor 130 and a magnet tracking subsystem 216 so that theneurostimulator 106 can recognize and adjust its behavior based on thepresence or absence of a magnetic field from a magnet applied externallyof the implant (see, e.g., FIG. 2).

The communication subsystem 208, via the central processing unit 210 orotherwise, may cause the memory subsystem 204 to record and store one ormore data items relative to the magnet sensor 130 and magnet trackingsubsystem 216, such parameters the values of which correspond to thenumber of times the magnet sensor 130 detected the presence of amagnetic field, or the times the neurostimulator 106 changed its statebased on the presence of the magnet and into which state theneurostimulator 106 transitioned, or the times the neurostimulator 106was forced into one state or the other. Similarly, the neurostimulator106 may be configured so that the memory subsystem 204 records andstores parameters the values of which correspond to some other actionthe presence of the magnet caused the neurostimulator 106 to take basedon the presence of the magnet (such as storing an electrographic signalor placing a marker in a record of an electrographic signal). Thecommunication subsystem 208 and/or the magnet tracking subsystem 216, inone embodiment, includes a timer that tracks a time period over whichthe magnet sensor continuously detects the magnetic field. The timerstarts tracking time when the presence of the magnetic field is detectedand stops tracking time when the presence of the magnetic field is nolonger detected. In one embodiment, the communication subsystem 208and/or the magnet tracking subsystem 216 includes a comparator thatcompares an elapsed time calculated by the timer, wherein the elapsedtime corresponds to the period over which the magnetic field is detectedto a first endpoint, a second endpoint, and an interval extendingbetween the first and second endpoints (as will be described below).

Typically, the communication subsystem 208 includes a telemetry antenna(which may be situated inside or outside of the neurostimulator housing)enabling the transmission and reception of signals, to and/or from anexternal apparatus, via inductive coupling. One external apparatus maycomprise a programmer 120 that is used by a physician to optimize theperformance of the neurostimulator 106 for the particular patient, inpart, by setting the values of the parameters that are used by theneurostimulator 106 to control the delivery of therapy and the responseof the neurostimulator 106 to the presence of a magnetic field.

Alternative embodiments of the communication subsystem 208 may use anantenna for an RF link or an audio transducer for an audio link to thepatient 124, in order to provide indications of neurological events, asystem's status, and/or other relevant information.

In a responsive neurostimulator, the control module 108 also may includea detection subsystem 202, which operates on signals corresponding todata sensed from the patient and routed from the electrodes 118 throughthe electrode interface 200. (The electrode interface 200 may act as aswitch to select which electrodes 118 to sense physiological data fromand may encompass other functions such as signal conditioning andprocessing including amplification and isolation).

The detection subsystem 202 may include an EEG analyzer function. TheEEG analyzer function may be adapted to receive EEG signals from theelectrode 118, through the electrode interface 200, and to process thoseEEG signals to identify neurological activity indicative of a seizure,an onset of a seizure, and/or a precursor to a seizure.

The detection subsystem 202 also may contain further sensing anddetection capabilities, including but not limited to, parameters derivedfrom other physiological conditions (such as electrophysiologicalparameters, temperature, blood pressure, movement, etc.).

The detection subsystem 202 is coupled with both the central processingunit 210 and the memory subsystem 204 so that data representative ofsensed EEG signals can be recorded and stored.

It should be noted that while the memory subsystem 204 is illustrated inFIG. 4 as a separate functional subsystem, the other subsystems mightalso use various amounts of memory to perform the functions describedherein, as well as other functions. Further, while the control module108 may be a single physical unit contained within a single physicalenclosure, namely the housing 104, this does not need to be the case andthe control module 108 may be configured differently. The control module108 may be provided as an external unit not adapted for implantation, orit may include a plurality of spatially separate units, each performinga subset of the capabilities described above. Also, it should be notedthat the various functions and capabilities of the subsystems of theneurostimulator 106, including the communications subsystem 208 and itsmagnet tracking system 216 may be performed by electronic hardware(e.g., hard wired modules), computer software (or firmware), or acombination thereof. The division of work between the central processingunit 210 and other functional subsystems may also vary. The functionaldistinctions illustrated in FIG. 4 may not reflect the integration offunctions in a real-world system or method according to the embodimentsdisclosed herein.

In one embodiment, the neurostimulator 106 is provided with magnetsensor 130, such as a giant magnetoresistance or “GMR” sensor, that isconfigured to generate a signal that is a function of whether the magnetsensor 130 senses the presence of a magnetic field. The signal generatedby the magnet sensor 130 may be processed or conditioned usingtechniques well known in the art such as debouncing, before it is usedto control the behavior of the neurostimulator.

The patient is provided with a magnet, for example, the donut-shapedmagnet 220 shown in FIGS. 2 and 3 which produces a magnetic field strongenough to be recognized by the magnet sensor 130 when the magnet 220 isbrought into close enough proximity to the neurostimulator 106.Implementations of magnet sensors other than that using a GMR sensorwill be apparent, such as reed switches and the like.

A magnet tracking system 216 included in the neurostimulator 106 isconfigured to initiate action based on whether the magnet sensor 130generates a signal corresponding to the presence of a magnet, includingactions that change the behavior of the neurostimulator 106. Moreparticularly, and according to one example, the magnet trackingsubsystem 216 may initiate action either (1) to disable the therapysubsystem 214 from delivering whatever therapy it might be programmed todeliver to the patient or (2) to toggle the state of the neurostimulator106 from a state in which therapy is disabled to a state in whichtherapy is enabled or vice versa.

Depending on how long a magnet sensor 130 detects the presence of amagnetic field, the magnet tracking subsystem 216 may cause theneurostimulator 106 to stay in the state the neurostimulator 106 was injust before the presence of the magnet was detected; transition from thestate the neurostimulator 106 was in just before the presence of themagnet was detected to a different state; or transition into or remainin, as the case may be, a predetermined one of the two states. In theexample described herein, the two possible states of the neurostimulator106 into which the magnet can transition the neurostimulator 106 are astate in which therapy is enabled and a state in which therapy isdisabled.

It will be appreciated that it may be desirable for the neurostimulator106 to behave in the presence of the magnet by transitioning to and fromstates other than “therapy enabled” and “therapy disabled” states, forexample, depending upon the application of the neurostimulator 106. Ifthe neurostimulator 106 is being used to deliver a form of continuoustherapy to the patient, use of the magnet may cause the neurostimulator106 to transition from a state in which it is delivering a higher levelof stimulation to a state in which it is delivering a lower level ofstimulation or a state in which it is in a stand-by mode. In othercircumstances, use of the magnet may cause the medical device totransition from a state corresponding to some level of activity to astate in which the device is completely off.

As will be discussed below, embodiments enable a patient to change astate of a neurostimulator 106 deterministically or with certainty,using a magnet. A patient (or caregiver) can cause the neurostimulator106 to go into a “therapy disabled” state by holding the magnet over theimplant for a long enough period of time, without having to be concernedabout the state the neurostimulator 106 was in just before the magnetwas applied. Further, once the patient (or caregiver) knows theneurostimulator 106 is in the “therapy disabled” state, he or she canreturn the neurostimulator 106 to a “therapy enabled” state by followinga simple procedure with the magnet.

These embodiments described here may be contrasted with other approachesto determining and/or changing a state of a neurostimulator in which thepatient is required to continuously hold the magnet over the implant inorder to ensure therapy is disabled, or in which a physician or otherhealth care provider is required to assist with changing the state ofthe implant, or in which the patient is left unsure, after using amagnet, as to exactly which state the implant is in (e.g., because theresult of applying the magnet depends on what state the neurostimulatorwas in just before the magnet was applied, and the patient may not becertain what that prior state was). Thus, embodiments provide a methodand system for using an external magnet to both select a state of aneurostimulator that is configured to be in at least two states andensure a state of a neurostimulator.

Example Method for Selecting a State of an Active Implantable MedicalDevice

Embodiments provide a method for using an external magnet tounequivocally change a state of an active implantable medical device. Inparticular, an example is described for a system and method for changingthe state of a neurostimulator to disable and enable a therapy theneurostimulator is configured to deliver to a patient (e.g., electricalstimulation therapy). In other embodiments and as noted above, thebehavior of the neurostimulator relative to use of the magnet may be totransition the neurostimulator between states other than “therapydisabled” and “therapy enabled.” In still other embodiments, the activeimplanted medical device need not necessarily be a neurostimulator.Embodiments also provide an auditory feedback feature that can be reliedupon together with the magnet to further enhance the patient's (or thecaregiver's) degree of certainty with respect to the experience (i.e.,as to whether the implant is in one state or another).

Referring to FIGS. 5 and 6, a sequence of events corresponding to thebehavior of an implanted neurostimulator relative to the presence of anexternal magnetic field, such as provided by a magnet 220 (FIG. 2) willnow be described. In sum, the timing diagram reflects what theneurostimulator 106 does after it begins to detect a magnetic field andthen it either ceases to detect the magnetic field or a certain timeinterval is exceeded.

In FIG. 5, the neurostimulator 106 may detect the presence of a magneticfield (e.g., because the patient is holding a magnet next to the implantsite so that the presence of the magnetic field is detected by a magnetsensor 130 in the neurostimulator 106) for a first interval, referred toas a “magnet toggle interval” 504, and for a second interval, referredto as a “magnet force off interval” 508.

In an example, if the patient holds a magnet in proximity to theimplanted neurostimulator 106 for a time longer than the magnet toggleinterval 504 and at least as long as the magnet force off interval 508,the neurostimulator 106 will disable therapy, regardless of whethertherapy was enabled or disabled just before this particular applicationof the magnet.

On the other hand, if the patient holds a magnet next to theneurostimulator 106 longer than the magnet toggle interval but for atime that is less than the end of the magnet force off interval (i.e.,the time period 509 in FIG. 5), the neurostimulator 106 will toggle thestate of therapy as soon as the neurostimulator 106 stops detecting themagnetic field; that is, the neurostimulator 106 will enable therapy ifit was disabled just before this particular application of the magnet,and will disable therapy if it was previously enabled just before thisparticular application of the magnet.

It will be appreciated that if the neurostimulator 106 first is forcedinto the “therapy disabled” state by reason of the fact that theneurostimulator 106 detected the presence of a magnetic fieldcontinuously throughout the end of the magnet force off interval (e.g.,by holding the magnet over the implant through and including the end ofthe magnet force off interval), then the patient or the patient'scaregiver will be assured that therapy is disabled. If the patient thenwants to make sure therapy is enabled, the patient can hold the magnetover the implant long enough to get past the magnet toggle interval andthen remove it before the end of the magnet force off interval. Now, thepatient will know the implant is in the “therapy enabled” state becausewhen the magnet was removed during the time period in which theneurostimulator 106 was susceptible of toggling, the neurostimulator 106toggled from the “therapy disabled” state to the “therapy enabled”state.

Each of the magnet toggle interval 504 and the magnet force off interval508 may be defined as parameters with parameter values in an algorithmfor determining a behavior of the neurostimulator 106 in response to theneurostimulator 106 detecting the presence of a magnetic field, such asthe behavior to disable therapy. The neurostimulator 106 may implementthis algorithm, for example, as part of the function of the “magnettracking subsystem” indicated in the block diagram of FIG. 4.

In this description, the duration of each of the magnet toggle interval504 and the magnet force off interval 508 are both measured orcalculated from a common starting point, namely, t_(start) 502.Alternatively, the duration of each interval may be defined withreference to unique start and end times along the axis 550 correspondingto units of time, for example, the start time of the magnet force offinterval may occur at the end time of the magnet toggle interval.

It should also be appreciated that embodiments provide a simple,deterministic two-step procedure to enable stimulation. Put another way,even if the patient is not sure which state the neurostimulator 106 isin when the process is started, the patient will be sure which state theneurostimulator 106 is in when the process ends, namely (in thisexample), a “therapy enabled” state. This deterministic two-stepprocedure is described as follows: (1) applying the magnet for longerthan the magnet force off interval 508 (longer than the endpoint at thetime t_(end2) 510), in which case the neurostimulator 106 will betransitioned into a “therapy disabled” state if the neurostimulator 106was not in that state already; and (2) removing the magnet andreapplying the magnet for longer than the magnet toggle interval 504(longer than the endpoint at the time t_(end1) 506), but removing themagnet again before the end of the magnet force off interval 508 (i.e.,removing the magnet again between the end of the magnet toggle interval504 and the end of the magnet force off interval 508 (between theendpoint at the time t_(end1) 506 endpoint at the time t_(end2) 510.

The length of the magnet toggle interval 504 and the magnet force offinterval 508 and the effect each interval has relative to the patient's(or caregiver's) use of a magnet 220 may be fixed (as in manufacturersettings for the device) and set forth in a patient manual provided atthe time the active implantable medical device is implanted.Alternatively, the instructions relevant to using a magnetic field toensure that an active implanted medical device is either in one state oranother may be made available over a website, or communicated in somesort of training related to the implant. In some circumstances, apatient or caregiver may be able to call a “Help Desk” or a doctor'soffice and ask someone to guide them through the procedure to first makesure the implant is in one state (e.g., the “therapy disabled” state)and, if desired, then to make sure the implant is in the other state(e.g., the “therapy enabled” state).

Thus, for example, the features of some embodiments that allow a magnetto be used to make sure a neurostimulator's therapy is disabled may berelied upon not only by patients and their regular caregivers, but alsoin emergent situations. For instance, emergency room personnel familiarwith the neurostimulator's behavior relative to a magnetic field may beable to use a magnet to disable a patient's therapy while the ERpersonnel are trying to diagnose or treat the patient.

In still other embodiments, one or both of the values that determine thelength of the magnet toggle interval 504 and the magnet force offinterval 508 may be programmable by a physician and thus tailored forspecific patients. A physician may select values for each of theintervals by interacting with the patient's implant using a programmer,such as a programmer 120A, and a wireless communications link to theimplant. When the values are programmable, the values of course willhave to be communicated in an appropriate manner to the patient and/orthe patient's caregivers, so that the patient will know how long theimplant has to detect the presence of the magnetic field for the implantto be forced into a first state and then for how long the implant has todetect the presence of the magnetic field for the implant to besusceptible of toggling into a second state so that, when the magneticfield is removed, the implant will transition into the second state.

In a typical case, the magnet force off interval 508 will beconsiderably longer than the magnet toggle interval 504. For example, amagnet force off interval 508 may be defined by values for relevantparameters as being twenty seconds long, and a corresponding magnettoggle interval 504 may be defined by relevant parameters as being onlyfive seconds long. Thus, when the magnet is held near theneurostimulator 106 for a relatively long duration (i.e., longer thanthe magnet force off interval 508), the stimulation is disableddeterministically; that is, the stimulation is disabled whether or notit was enabled or disabled just prior to application of the magnet atthe time t_(start) 502. Subsequently, when the magnet is removed andthen again held near the neurostimulator 106 for a shorter durationbefore it is again removed (i.e., for longer than magnet toggle interval504 but for less than the whole of the magnet force off interval 508 (orremoved between the endpoint at the time t_(end1) 506 but a time lessthan the endpoint at the time t_(end2) 510)), the stimulation isdeterministically enabled. In other words, after following thisprocedure, the stimulation is enabled, regardless of whether it enabledor disabled just before the two-step procedure was undertaken.

A method according to embodiments will now be described moreparticularly with reference to the top, middle and bottom panels of FIG.5, where time is represented by the x-axis 550. In each panel of FIG. 5,the active implantable medical device begins to detect the presence of amagnetic field at the time t_(start) 502. In the top panel 512A, theactive implantable medical device ceases to detect the presence of amagnetic field at a time t_(swipe) 514A, which occurs before the endpoint of the magnet toggle interval 504 at the time t_(end1) 506. Asdescribed above, if the implant detects the magnet for less than themagnet toggle interval 504, the implant will not change state: it willremain in whatever state it was in at the time t_(start) 502 (Atransient detection of a magnetic field by the implant may cause nothingat all to happen. However, in some embodiments, the presence of themagnetic field for less than the magnet toggle interval 504 may causethe implant to do something other than change states, however, as isdescribed in more detail below in connection with the discussion of a“magnet swipe.”) The unchanged state of the active implantable medicaldevice is indicated graphically by the bar 516.

In the middle panel 512B, the active implantable medical device ceasesto detect the presence of a magnetic field at a time t_(toggle) 514B.Since the time t_(toggle) 514B occurs in the time period 509, after themagnet toggle interval 504 has ended (at the time t_(end1) 506) andbefore the magnet force off interval 508 has ended (at the time t_(end2)510), the failure of the implant to continue to detect the magneticfield will cause the implant to transition from a first state to asecond state (e.g., from a “therapy disabled” state to a “therapyenabled” state or vice versa). In other words, if the active implantablemedical device ceases to detect the magnetic field during the timeperiod 509, and the implant was in the first state at the beginning (attime t_(start) 502), then it will change to the second state at the timet_(toggle) 514B. This transition from the first state to the secondstate is indicated graphically by line 520A and bar 520B. On the otherhand, if the active implantable medical device ceases to detect themagnetic field during the time period 509 and the implant was in thesecond state when the magnetic field began to be detected (at timet_(start) 502), then the implant will transition to the first state atthe time t_(toggle) 514B. This transition from the second state to thefirst state is indicated graphically by bar 518A and line 518B.

In the bottom panel 512C, the active implantable medical device ceasesto detect the presence of a magnetic field at a time t_(postforceoff)514C. Since the time t_(toggle) 514B occurs in the time period 509,after the magnet force off interval 508 has ended (at the time t_(end2)510), then the active implantable medical device will be forced intodesignated one of the first or second states (e.g., forced into a“therapy disabled” state) as soon as the time t_(end2) 510 is exceeded.The state of the neurostimulator, which is forced to be a designatedstate at time t_(end2) 510, is indicated graphically by bar 522. In thisexample, as long as the time t_(end2) 510 is exceeded, it does notmatter when the implant thereafter stops detecting the magnetic field(e.g., a magnet 220 being manipulated by the patient or caregiver), theimplant will be in the designated state if the magnetic field remains inplace for longer than t_(end2) 510 (e.g., longer than the timet_(postforceoff) 514C, or shorter than the time t_(postforceoff) 514Cbut at least as long as the time t_(end2) 510).

While embodiments may be configured so that the default behavior of theneurostimulator 106 during the time period 509 when the neurostimulator106 is to be susceptible of toggling (from whichever state it was injust before the magnetic field was detected to a different state if themagnetic field is no longer detected by the magnet sensor 130 [i.e., ifthe magnet 220 is taken away]), there may be circumstances under whichit is not desirable to allow a magnetic field to enable theneurostimulator 106 to deliver therapy. Thus, in some embodiments, theneurostimulator 106 may be provided with a parameter or parameters,programmable by a physician using a programmer 120, which will have theeffect of disabling the state changing behavior of the neurostimulator106 based on the presence or absence of a magnetic field. In otherwords, a physician may want to turn a patient's therapy off and notallow the patient to turn it back on using the magnet.

This may be the case where the patient is participating in a “sham” or“placebo” arm of a clinical trial, in which therapy is temporarilyturned off and in which, if therapy were to be enabled, the scientificdata derived from the patient would be compromised. Similarly, if theneurostimulator 106 has the capacity to sense and record and storeelectrographic signals from the patient as well as to deliver a form ofelectrical stimulation therapy to the patient (e.g., a responsiveneurostimulator), the physician may wish to leave the sensing, recordingand storing functions in operation but to disable the stimulation untilsuch time as the physician is able to diagnose what is happening withthe patient and then use the diagnosis to decide upon a course ofstimulation therapy. In this case, the physician may want the patient tostill be able to use a magnet 220 for “magnet swipes” to cause theneurostimulator 106 to record electrographic signals (or to mark recordsof electrographic signals) (discussed further below), but the physicianmay not want the patient to be able to use the magnet to transition theneurostimulator 106 into a “therapy enabled” state.

An implantable neurostimulator 106 may be programmed to block theability for a detected magnetic field to change the state of aneurostimulator 106 from a “therapy disabled” to a “therapy disabled”state by, for example, setting the values for the magnet toggle interval504 and the magnet force off interval 508 to 0 s, or by otherwisepreventing the neurostimulator 106 from transitioning into a “therapyenabled” state whenever the magnet sensor 130 detects a magnetic field.

In other embodiments, once an implantable neurostimulator 106 haschanged states from “therapy disabled” to “therapy enabled” or viceversa some maximum amount of times, the implantable neurostimulator 106may be controlled by a parameter that either disables additional statechanges from “therapy disabled” to “therapy enabled” or only allows atransition into a state other than a “therapy enabled” state from a“therapy disabled” state. For instance, a physician may program apatient's neurostimulator 106 so that, after a patient (or caregiver)has caused the implant to change from “therapy enabled” to “therapydisabled” five times in a single day, further detection of the presenceof a magnetic field will under no circumstances allow therapy to beenabled (e.g., until the patient talks to his or her physician toconfirm that the toggle behavior is desired and is not the undesiredresult of, for instance, strong environmental magnetic fields in thepatient's workplace). Alternatively, after excessive toggling betweenstates (e.g., more than 20 times), when the neurostimulator 106 nextdetects the presence of a magnetic field rather than toggling from a“therapy disabled” state to a “therapy enabled” state, theneurostimulator 106 may change to a state in which some nominal level oftherapy (i.e., not the “full strength” therapy corresponding to the“therapy enabled” state) is delivered, until a physician can beconsulted about the situation. In some embodiments, the parameters thatcontrol whether the presence of a magnetic field will allow theneurostimulator 106 to changes states at all, or that will conditionstate changes based on some other criteria may be programmed using aphysician programmer or some other external component configured tocommunicate with the implant.

As described above, an active implantable medical device according toembodiments may be configured to undertake action other thantransitioning between one state to another upon detecting a magneticfield with its magnet sensor 130. In some embodiments, when aneurostimulator 106 detects the presence of a magnetic field beginningat time t_(start) 502 but for less than the end of the magnet toggleinterval 504 (i.e., before time t_(end1) 506), the neurostimulator 106will not change from a “therapy disabled” state to a “therapy enabled”state or vice versa, but a “magnet swipe” before time t_(end1) 506 maycause the neurostimulator 106 to take some other action. For example,the neurostimulator currently under investigation under the name “RNSSYSTEM” neurostimulator for NeuroPace, Inc. may monitor electricalactivity sensed from the patient's brain and may record some of thatactivity in records that are stored, at least temporarily, in a memoryin the neurostimulator. The neurostimulator 106 may also record andstore information about what the neurostimulator 106 is doing at aparticular time during its operation (e.g., the time and date aparticular record of electrical activity was created and/or stored, anitem of information corresponding to the remaining battery life of theimplanted power source, whether or not the device was capable ofdelivering neurostimulation to the patient at the level at which it wasprogrammed to deliver the stimulation, etc.).

In situations in which the neurostimulator 106 has features similar tothe aforementioned features for sensing electrical activity and/orcreating records and storing the records of the electrical activity andrecording and storing “device diagnostics”-type informationcorresponding to information about the behavior of the device itself (asdistinguishable from the electrical activity of the patient which thedevice is monitoring), a “magnet swipe” in the period between the timet_(start) 502 and the time t_(end1) 506 (i.e., in which removal of themagnet occurs before the end of magnet toggle interval 508 after whichthe neurostimulator 106 becomes susceptible of toggling from the stateit is in to a different state) may, for example, cause one or more ofthe following to occur: (1) causing the neurostimulator 106 to store inits memory a record corresponding to the electrical activity theneurostimulator 106 was sensing at some point during that magnetdetection period; (2) causing the neurostimulator 106 to store in itsmemory one or more values corresponding to the date and a time when themagnet was detected (e.g., a time during the magnet detection periodcorresponding to a particular “magnet swipe”); and (3) causing theneurostimulator 106 to introduce some form of a marker into a record ofelectrographic activity being created in the neurostimulator 106 at somepoint during that magnet detection period (e.g., a marker indicatingthat the patient swiped the magnet at a particular point during therecording of the neurostimulator 106).

FIG. 6 is similar to the timing diagram of FIG. 5 illustrating thebehavior of a neurostimulator 106 relative to the use of a magnet whenthe magnet is applied at a time t_(start) 502 and then removed (1)before a time t_(end1) 506 at the endpoint of a magnet toggle interval504 (top panel 512A); (2) after the time t_(end1) 506 at the endpoint ofa magnet toggle interval 504 but before a time t_(end2) 510 at theendpoint of a magnet force off interval 508 (middle panel 512B); and (3)after the time t_(end2) 510 at the endpoint of a magnet force offinterval 508 (bottom panel 512C). However, in FIG. 6 the additionalfeature of auditory feedback is illustrated, to convey that, inaccordance with some embodiments, the magnet tracking system 216 may beassociated with one of two auditory tones that are generated to guidethe patient as to which state the neurostimulator 106 is in or to whichstate the neurostimulator 106 will transition if the neurostimulator 106ceases to detect the magnetic field (i.e., which state theneurostimulator 106 will go into if the magnet is removed.) Moreparticularly, in an example, the “therapy disabled” state is associatedwith a long, low tone which is represented by the shaded blocks 526 inFIG. 6. The “therapy enabled” state is associated with a series ofbeeps, which are represented by the strings of solid black rectangles528 in FIG. 6. In one embodiment, the auditory feedback is generated bya feedback signal generator such as a piezoelectric element driven by anoscillator circuit or digital waveform generator.

Referring now to the top panel 512A of FIG. 6, if the neurostimulator106 detects the presence of a magnetic field at time t_(start) 502 andthe neurostimulator 106 is then in a “therapy disabled” state, then thepatient will hear the long, low tone 526. In this example, theneurostimulator 106 ceases to detect the magnetic field at timet_(swipe) 514A. When the magnetic field is no longer detected, theneurostimulator 106 remains in the “therapy disabled” state and stopsgenerating the long, low tone 526. In another embodiment, the long, lowtone 526 continues for a predetermined length of time or for a length oftime determined by a programmed setting.

Referring now to the middle panel 512B of FIG. 6, if the neurostimulator106 continues to detect the presence of the magnetic field throughoutthe magnet toggle interval 504 (i.e., until the time t_(end1) 506) thenthe long, low tone 526 will continue to be generated. Then, at the endof the magnet toggle interval 504, the neurostimulator 106 will becomesusceptible of toggling from the “therapy disabled” state to a “therapyenabled” state up until the end point of the magnet force off interval508 (i.e., up until the magnetic field is detected beyond the timet_(end2) 510). In the example of FIG. 6, the neurostimulator 106 stopsdetecting the magnetic field at the time t_(toggle) 514B (e.g., becausethe patient has taken a magnet 220 away from the location of theimplant). Throughout the time the neurostimulator 106 is susceptible oftoggling from the “therapy disabled” state to the “therapy enabled”state, the beeps 528 will be generated. This will let the patient knowthat if the magnetic field is removed (e.g., if the patient takes themagnet away), then the neurostimulator 106 will toggle into the “therapyenabled” state from the “therapy disabled” state.

Referring now to the bottom panel 512C of FIG. 6, if the neurostimulator106 continues to detect the presence of the magnetic field throughoutall of the magnet toggle interval 504 and all of the magnet force offinterval 508 (i.e., from the time t_(start) 502 through and includingthe time t_(end2) 510), then the long, low tone 526 will be generatedfor the entirety of the magnet toggle interval 504 (from the timet_(start) 502 to the time t_(end1) 506), the beeps 528 will be generatedduring the time period 509 (between the magnet toggle interval endpointtime t_(end1) 506 through the magnet force off interval endpoint timet_(end2) 510), and then the long, low tone 526 will be generated againas soon as the magnetic field has been detected long enough to force theneurostimulator 106 into the “therapy disabled” state. When theneurostimulator 106 ceases to detect the magnetic field (at timet_(postforeoff) 514C in FIG. 6), neither the long, low tone 526 nor thebeeps 528 are generated.

FIG. 6 also illustrates the opposite case for the various timingscenarios for when the neurostimulator 106 detects and ceases to detectthe presence of a magnetic field. Referring again to the top panel 512Aof FIG. 6, if the neurostimulator 106 detects the presence of a magneticfield at time t_(start) 502 and the neurostimulator 106 is then in a“therapy enabled” state, then the patient will begin to hear the seriesof beeps 528. When the neurostimulator 106 ceases to detect the magneticfield at time t_(swipe) 514A, the neurostimulator 106 remains in the“therapy enabled” state and stops generating the beeps 528.

Referring now to the middle panel 512B of FIG. 6, if the neurostimulator106 continues to detect the presence of the magnetic field throughoutthe magnet toggle interval 504 (i.e., until the time t_(end1) 506) andif the neurostimulator 106 was in a “therapy enabled” state at timet_(start) 502, then the beeps 528 will continue to be generated. Then,at the end of the magnet toggle interval 504, the neurostimulator 106will become susceptible of toggling from the “therapy enabled” state toa “therapy disabled” state up until the end point of the magnet forceoff interval 508 (i.e., up until the magnetic field is detected beyondthe time t_(end2) 510). In the example of FIG. 6, the neurostimulator106 stops detecting the magnetic field at the time t_(toggle) 514B(e.g., because the patient has taken a magnet 220 away from the locationof the implant). Throughout the time the neurostimulator 106 issusceptible of toggling from the “therapy enabled” state to the “therapydisabled” state, the long, low tone 526 will be generated. This will letthe patient know that if the magnetic field is removed (e.g., if thepatient takes the magnet away), then the neurostimulator 106 will toggleinto the “therapy disabled” state from the “therapy enabled” state.

Referring now to the bottom panel 512C of FIG. 6, if the neurostimulator106 continues to detect the presence of the magnetic field throughoutall of the magnet toggle interval 504 and all of the magnet force offinterval 508 (i.e., from the time t_(start) 502 through and includingthe time t_(end2) 510), and if the neurostimulator 106 was in a “therapyenabled” state at time t_(start) 502, then the beeps 528 will begenerated for the entirety of the magnet toggle interval 504 (from thetime t_(start) 502 to the time t_(end1) 506), the long, low tone 526will be generated during the time period 509 (between the magnet toggleinterval endpoint time t_(end1) 506 through the magnet force offinterval endpoint time t_(end2) 510), and then the long, low tone 526will be generated again (or just continue to be generated) as soon asthe magnetic field has been detected long enough to force theneurostimulator 106 into the “therapy disabled” state. When theneurostimulator 106 ceases to detect the magnetic field (at or aftertime t_(forceoff) 514C in FIG. 6), neither the long, low tone 526 northe beeps 528 are generated.

Alternatively or additionally, in some embodiments, the magnet trackingsystem 216 may cause different sounds to be produced whenever the magnetsensor 130 detects the presence of a magnet where one sound correspondsto the magnet toggle interval 504, another corresponds to the magnetforce off interval 508 (and persists for some predetermined time afterthe endpoint t_(end2) 510 when the magnet force off interval 508 hasbeen exceeded, and still another corresponds to the time period 509 whenthe neurostimulator 106 is between the endpoint t_(end1) 506 of themagnet toggle interval 504 and the endpoint t_(end2) 510 of the magnetforce off interval 508.

The sounds(s) may be generated by the neurostimulator 106 itself, e.g.,using an annunciator element and/or circuit provided in theneurostimulator 106. Alternatively, the tone(s) may be generated by someother component of a neurostimulation system based on commands receivedfrom the implant. In other embodiments, rather than being auditory, thefeedback may manifest in some other somatosensory effect, such as avibration.

In still other embodiments, when the feedback is auditory, differenttones may be used to indicate when the magnet has been recognized by theneurostimulator 106, when the neurostimulator 106 is in the time period509 when it is susceptible of being toggled from a “therapy disabled”state to a “therapy enabled” state (or vice versa, as the case may be),and when the neurostimulator 106 has been forced to a “therapy disabled”state, i.e., after the endpoint of the magnet force off interval 508 attime t_(end2) 510 has been reached or exceeded. For example, beepsgenerated at different frequencies may be used for the differentauditory feedback signals. The patient (or caregiver) may hear: (1) arapid series of beeps when the neurostimulator 106 is in the time period509 (i.e., when it is susceptible of toggling between the “therapyenabled” and “therapy disabled” states); (2) a single short confirmatorybeep when the neurostimulator 106 first detects the presence of themagnet (at time t_(start) 502 in FIG. 6; and (3) a longer confirmatorytone for a few seconds once the magnet force off interval 508 has beenexceeded (i.e., after time t_(end2) 510 in FIG. 6) and theneurostimulator 106 thus has been forced into a “therapy disabled”state. In other embodiments, a distinct tone may also be generated ifthe presence of the magnet ceases to be detected by the neurostimulator106 while the neurostimulator 106 is in the time period 509. In otherwords, if the neurostimulator 106 toggles states in the time period 509,a tone may be generated to confirm that such toggling occurred.

In still further embodiments, the tones selected may correspond to whichstate the neurostimulator 106 is in for so long as the neurostimulator106 detects the presence of the magnet and for some predetermined timeafter the magnetic field is removed. For example, one tone may beassociated with a “therapy enabled” state and another with a “therapydisabled” state. When the neurostimulator 106 has been forced into the“therapy disabled” state by leaving the magnet in place over the implantfor at least as long as the magnet force off interval 508, the toneassociated with the “therapy disabled” state may be generated for a fewseconds after that interval has been exceeded to confirm that therapyindeed has been disabled and it is all right for the patient to removethe magnet. Other possibilities for the auditory feedback will bereadily apparent.

It should be appreciated that while various embodiments have thus beendescribed herein with regard to an neurostimulator 106, embodiments maybe integrated within all sorts of active medical implantable devices,including but not limited to the following: implantable medical devicesdelivering treatment in the form of drug delivery, optical energy, andmechanical energy; implantable medical devices that may be controlledwith means such as mechanical pressure or electrical fields andimplantable medical devices capable of operating in more than one modeor with more than one setting, including both simple “on” and “off”modes and more complex cases in which modes correspond to variousstimulation setting or types of therapy delivery.

FIG. 7 is a flow diagram of elements of a method 700 for selecting astate of a neurostimulator 106, in accordance with an embodiment. Thetwo states are “therapy enabled” and “therapy disabled.” It will beappreciated that in other embodiments, the states of the neurostimulator106 affected by use of the magnet may be different, such as simple “on”and “off” states, “on” and “standby” states, “sensing only” and “sensingand stimulation” states, and so on and so forth.

With reference now to FIG. 4 and FIG. 7, a neurostimulator 106 accordingto embodiments includes a communication subsystem 208 which enablescommunication between the neurostimulator 106, when implanted in apatient, and the outside world. The communication system 208 includes amagnet sensor 130 (for example, provided on a printed circuit boardwithin a neurostimulator housing or otherwise associated with a controlmodule 108 of a neurostimulator 106). The magnet sensor 130 generates anoutput signal when the magnet sensor 130 detects the presence of amagnetic field, such as from a magnet 220 that is provided to thepatient. The magnet sensor output is processed and used by a magnettracking subsystem 216 to determine whether and if so how to change thebehavior of the neurostimulator 106 based on the presence of the magnet.

In FIG. 7 at block 705, the method and system monitors to determinewhether the presence of a magnet is detected. This may be accomplished,for example, by monitoring the output of the magnet sensor 130. When atblock 710 the neurostimulator 106 detects a magnet (e.g., at timet_(start) 502 in FIG. 5), then at block 715 the magnet trackingsubsystem 216 begins to track what happens next in terms of how long thepresence of the magnet continues to be detected and whether the magnetceases to be detected.

If at block 720 the neurostimulator 106 still detects a magnet, then atblock 725 the neurostimulator 106 determines whether the magnet forceoff interval 508 has been exceeded. If the magnet force off interval 508has been exceeded, then at block 730 the neurostimulator 106 is forcedfrom a “therapy enabled” state into a “therapy disabled” state (if theneurostimulator 106 was in a “therapy enabled” state when the presenceof the magnet was first detected at block 710) or it is left in a“therapy disabled” state (if it was in a “therapy disabled” state whenthe presence of the magnet was first detected at block 710).

If at block 720 the neurostimulator 106 no longer detects a magnet, thenat block 735 the neurostimulator 106 determines whether the magnettoggle interval 504 has been exceeded. If the magnet toggle interval 504has been exceeded (or has ended), then at block 740 the neurostimulator106 determines which state the neurostimulator 106 is in. If theneurostimulator 106 is in a “therapy enabled” state at block 740, thenat block 745, the neurostimulator 106 is transitioned (or toggled) to a“therapy disabled” state; if the neurostimulator 106 is in a “therapydisabled” state at block 740, then at block 750, the neurostimulator 106is transitioned (or toggled) to a “therapy enabled” state. On the otherhand, if at block 720 the neurostimulator 106 no longer detects a magnetand at block 735 the magnet toggle interval 504 has not been exceeded(or has not ended), then the neurostimulator 106 does nothing: That is,if the neurostimulator 106 was in a “therapy disabled” state just beforethe presence of the magnet was first detected at block 710 and theendpoint of the magnet toggle interval 504 is not reached before themagnet is no longer detected (e.g., the magnet is taken away from theimplant site), then the neurostimulator 106 remains in the “therapydisabled” state. If the neurostimulator 106 was in a “therapy enabled”state just before the presence of the magnet was first detected at block710, then the neurostimulator 106 remains in the “therapy enabled” statewhen the neurostimulator 106 ceases to detect the presence of the magnetbefore the magnet toggle interval is up.

Thus, if a patient or a patient's caregiver wants to ensure that animplanted neurostimulator 106 is in a state in which it is not able todeliver therapy (e.g., electrical stimulation), the patient or caregivercan accomplish this simply by applying the magnet for at least as longas the magnet force off interval 508. Once the patient is assured thatthe implant is in a “therapy disabled” state, the neurostimulator 106can be returned to a “therapy enabled” state by removing the magnet fromthe neurostimulator 106 for a moment, then reapplying the magnet so thatthe clock associated with time t_(start) 502 is reset, and the magnettracking subsystem 216 again begins to track what happens next in termsof how long the presence of the magnet continues to be detected andwhether the magnet ceases to be detected. The patient then can take themagnet away when the neurostimulator 106 is in the time period 509 whenit is susceptible of toggling back to the “therapy enabled” state, whichwill cause the neurostimulator 106 to transition into the “therapyenabled” state. The patient (or caregiver) then can expect that theneurostimulator 106 will remain in the “therapy enabled” state unlessand until the magnet sensor detects a magnet again. (Although in somecircumstances the neurostimulator 106 may be configured to turn itselfoff under certain conditions that are not related to the presence orabsence of a magnetic field.)

In some embodiments, the behavior of the neurostimulator 106 after ithas been forced into a “therapy disabled” state may be more complex thanin the example above. A method and system according to embodiments mayrequire that, if the patient or caregiver wishes to transition theneurostimulator 106 to a “therapy enabled” state once a magnet hascaused it to be forced into a “therapy disabled” state, the therapy willhave to increase gradually up to a programmed therapeutic level ratherthan instantly be delivered at the therapeutic level when theneurostimulator 106 is toggled into a “therapy enabled” state byremoving the magnet during the time period 509.

Similarly, embodiments are contemplated in which transitioning out of a“therapy enabled” state into a “therapy disabled” state is not a simple“on” to “off” action, but rather the therapy is gradually decreased oversome predetermined period of time until it is considered to becompletely disabled. Gradually, ramping a therapy up or down when theneurostimulator 106 transitions between states may be more appropriatein some applications of a neurostimulator 106 than in others. Forexample, if the patient is likely to sense the stimulation while it isbeing delivered then titrating a parameter (e.g., amplitude of thestimulation) up or down during state changes may be desirable. In othercircumstances, abrupt changes in therapy may have unwanted resultsrelative to the symptoms the therapy is intended to alleviate (e.g., thesymptom of tremor for a movement disorders application of aneurostimulator).

In some embodiments, and as explained with reference to FIG. 6, above,the neurostimulator 106 causes one or more audible signals to begenerated whenever the magnet is detected, wherever the neurostimulator106 is in the time period 509 (i.e., susceptible of toggling betweenstates); and whenever the magnet has been applied long enough to forcethe neurostimulator 106 into the “therapy disabled” state. In stillother embodiments, whenever the magnet sensor 130 of the neurostimulator106 detects the presence of the magnet, the neurostimulator 106 willgenerate a signal such as an audible signal that allows the patient orcaregiver to gauge whether the magnet 220 is close enough to the magnetsensor 130. For example, a series of beeps at a certain tone may beconfigured to increase in frequency when the patient has the magnet 220over a “sweet spot” relative to the magnet sensor 130 in the implantedneurostimulator 106, so that the patient can be assured that his or heruse of the magnet will cause the behavior of the neurostimulator 106 thepatient expects the magnet to cause.

It will be appreciated that there are numerous ways in which the methodand system according to embodiments described above may be implemented.For example, software, hardware (including ASICs, FPGAs, and othercustom electronics), and various combinations of software and hardwareare all solutions that would be possible to practitioners of ordinaryskill in the art of electronics and systems design. It should further benoted that the steps described herein as performed in software need notbe, as some of them can be implemented in hardware, if desired, tofurther reduce computational load on the processor. In variousembodiments, the methods and systems described above is implemented byprocessors and electrical components under the control of computerreadable and computer executable instructions. The computer readable andcomputer executable instructions reside, for example, in anon-transitory data storage medium such as computer usable volatile andnon-volatile memory. However, the computer readable and computerexecutable instructions may reside in any type of non-transitorycomputer readable storage medium.

It will also be appreciated that there are numerous possibilities foraccomplishing the functions described above in a method and systemaccording to embodiments. For example, the magnet tracking subsystem 216(see the block diagram of FIG. 4) may be implemented as a magnettracking software object capable of passing (via an interface such as anevent messaging buffer) messages and information to other softwareobjects, such as software objects that control delivery of therapy. Themagnet tracking software object is configured to exist in one of a setof software object states, where each software object state ischaracterized by one or more of: the activity of the software objectwhile in that software object state; the events or conditions that causea transition of the software object into a different software objectstate; and the activities of the software object that occur when thesoftware object transitions into a different software object state.

For example, the magnet tracking software object could be configured tobe in a software object state labeled MAGNET_TRACKING_IDLE when amagnetic field is not currently detected by the neurostimulator 106.Upon initial detection of a magnetic field, the magnet tracking softwareobject would enter a second software object state labeledMAGNET_TOGGLE_INTERVAL. At this transition, a timer implemented insoftware or hardware would be configured to run for the duration of themagnet toggle interval 504.

While in the MAGNET_TOGGLE_INTERVAL software object state, the magnettracking software object would respond to several conditions. If amagnetic field becomes no longer detected, then the magnet trackingsoftware object would re-enter the MAGNET_TRACKING_IDLE software objectstate and cancel the timer related to the magnet toggle interval 504. Onthe other hand, if this timer expires while still inMAGNET_TOGGLE_INTERVAL, the magnet tracking software object would entera third software object state labeled MAGNET_FORCE_OFF_INTERVAL. At thistransition, a timer implemented in software or hardware would beconfigured to run for the duration of the magnet force off interval 508.

While in the MAGNET_FORCE_OFF_INTERVAL software object state, the magnettracking software object would respond to several conditions. If amagnetic field becomes no longer detected, then the magnet trackingsoftware object would toggle therapy, e.g. from a “therapy disabled”state to a “therapy enabled” state or from a “therapy enabled” state toa “therapy disabled” state, would re-enter the MAGNET_TRACKING_IDLEsoftware object state, and would cancel the timer related to the magnetforce off interval 508. On the other hand, if this timer expires whilestill in MAGNET_FORCE_OFF_INTERVAL, the magnet tracking software objectwould set the neurostimulator state to a “therapy disabled” state andwould enter a fourth software object state labeledMAGNET_HAS_BEEN_FORCED_OFF. The magnet tracking software object wouldremain in this state until a magnetic field becomes no longer detected,at which point it would return to the MAGNET_TRACKING_IDLE softwareobject state.

Embodiments of methods and systems for controlling the state of aneurostimulator based on the presence or absence of a magnetic field(such as provided by an external magnet provided to the patient) thushave been described. While the present technology has been described inparticular examples, it should be appreciated that the embodimentsshould not be construed as limited by such examples, but ratherconstrued according to the claims.

Various example embodiments are thus described. All statements hereinreciting principles, aspects, and embodiments of the present technologyas well as specific examples thereof, are intended to encompass bothstructural and functional equivalents thereof. Additionally, it isintended that such equivalents include both currently known equivalentsand equivalents developed in the future, i.e., any elements developedthat perform the same function, regardless of structure. The scope,therefore, is not intended to be limited to the embodiments shown anddescribed herein but rather is defined by the appended claims.

What is claimed is:
 1. An active implantable medical device comprising:a sensor for detecting a presence of a magnetic field; a timerconfigured to keep track of the amount of time the sensor detects themagnetic field uninterrupted; a magnet tracking subsystem including amagnet tracking software object configured to exist in one of aplurality of software object states, and to transition to and fromsoftware object states based on one or more of a detection of a magneticfield, a duration of a detection of a magnetic field, and a state of thetimer; and an interface for passing messages and information from themagnet tracking software object to at least one other software objectthat controls the state of the active implantable medical device, whichstate is one of a plurality of states comprising a first medical deviceactivity state or a second, different medical device activity state,wherein the magnet tracking subsystem is configured to: monitor a numberof times the state of the active implantable medical device hastransitioned from a designated one of the plurality of states to anotherone of the plurality of states within a period of time, and prevent thestate of the active implantable medical device from transitioning fromthe designated one of the plurality of states to the other one of theplurality of states when the number of times exceeds a threshold value.2. The device of claim 1, wherein the plurality of software objectstates comprises: a first software object state corresponding to acondition when no magnetic field is detected by the sensor; a secondsoftware object state corresponding to the condition when a magneticfield has begun to be detected by the sensor and the timer has beeninitiated; a third software object state corresponding to the conditionwhen a magnetic field has been detected by the sensor for longer than afirst interval; and a fourth software object state corresponding to thecondition when a magnetic field has been detected by the sensor forlonger than both a first interval and a second interval.
 3. The deviceof claim 2, wherein, the magnet tracking subsystem is configured torespond to a condition when a magnetic field ceases to be detectedwithin the first interval by stopping the timer.
 4. The device of claim2, wherein the magnet tracking subsystem is configured to stop the timerupon a transition from the second software object state to the firstsoftware object state.
 5. The device of claim 2, wherein the magnettracking subsystem is configured to respond to a condition when amagnetic field is detected for the duration of the first interval bytransitioning from the second software object state to the thirdsoftware object state.
 6. The device of claim 2, wherein the magnettracking subsystem is configured to respond to a condition when amagnetic field ceases to be detected within the second interval bytoggling the state of the active implantable medical device from thefirst medical device activity state to the second, different medicaldevice activity.
 7. The device of claim 2, wherein the magnet trackingsubsystem is configured to toggle the state of the active implantablemedical device from the first medical device activity state to thesecond, different medical device activity state upon a transition fromthe third software object state to the first software object state. 8.The device of claim 2, wherein, the magnet tracking subsystem isconfigured to respond to a condition when a magnetic field is detectedthroughout the entirety of the second interval by setting the state ofthe active implantable medical device to the designated one of theplurality of states.
 9. The device of claim 2, wherein, the magnettracking subsystem is configured to set the state of the activeimplantable medical device to the designated one of the plurality ofstates upon a transition from the third software object state to thefourth software object state.
 10. The device of claim 2 wherein themagnet tracking subsystem is configured to respond to the condition whenthe second interval has been exceeded by ensuring that the activeimplantable medical device is in a predetermined one of the firstmedical device activity state or the second medical device activitystate.
 11. The device of claim 2, wherein the magnet tracking subsystemis configured to ensure that the active implantable medical device is ina predetermined one of the first medical device activity state or thesecond medical device activity state upon a transition from the thirdsoftware object state to the fourth software object state.
 12. Thedevice of claim 2, further comprising: a feedback signal generator, thefeedback signal generator configured to generate: a first audible tonewhenever the magnet tracking subsystem is in the second software objectstate; a second, different audible tone whenever the active implantablemedical device is susceptible of transitioning from the first medicaldevice activity state to the second medical device activity statebetween the end of the first interval and the end of the secondinterval; and whichever of the first or second audible tones thatcorresponds to a predetermined one of the first or second medical deviceactivity states if the sensor still detects the presence of the magneticfield after the second interval.
 13. The device of claim 1, wherein: thefirst medical device activity state corresponds to a state in which atherapy the active implantable medical device is configured to deliveris disabled, and the second medical device activity state corresponds toa state in which a therapy the active implantable medical device isconfigured to deliver is enabled.
 14. The device of claim 2, furthercomprising: a feedback signal generator, the feedback signal generatorconfigured to generate: a first audible tone when the magnet trackingsubsystem is in the second software object state; a second, differentaudible tone when the magnet tracking subsystem is in the third softwareobject state; and a third, different audible tome when the magnettracking subsystem is in the fourth software object state.
 15. An activeimplantable medical device comprising: a sensor for detecting a presenceof a magnetic field; a timer configured to keep track of the amount oftime the sensor detects the magnetic field uninterrupted; a magnettracking subsystem including a magnet tracking software objectconfigured to exist in one of a plurality of software object states, andto transition to and from software object states based on one or more ofa detection of a magnetic field, a duration of a detection of a magneticfield, and a state of the timer; and an interface for passing messagesand information from the magnet tracking software object to at least oneother software object that controls the state of the active implantablemedical device, which state is one of a therapy enabled state or atherapy disabled state, wherein the plurality of software object statescomprises a first software object state corresponding to a conditionwhen no magnetic field is detected by the sensor, a second softwareobject state corresponding to the condition when a magnetic field hasbegun to be detected by the sensor and the timer has been initiated, athird software object state corresponding to the condition when amagnetic field has been detected by the sensor for longer than a firstinterval, and a fourth software object state corresponding to thecondition when a magnetic field has been detected by the sensor forlonger than both a first interval and a second interval wherein themagnet tracking subsystem is configured to: set the state of the activeimplantable medical device to the therapy disabled state upon atransition from the third software object state to the fourth softwareobject state; monitor a number of times there has been a transition fromthe third software object state to the fourth software object statewithin a period of time, and prevent the state of the active implantablemedical device from being changed from the therapy disabled state to thetherapy enabled state when there is a transition from the third softwareobject state to the first software object state, and the number of timesexceeds a threshold value.